#ifndef __OBULLET_CACHE_H__
#define __OBULLET_CACHE_H__

class oFace;

namespace platform
{
	class oBulletDef;

	class oDLL oBulletCache: public CCSAXDelegator
	{
	public:
		~oBulletCache();
		void load(const char* filename);
		void unload();
		oBulletDef* getBulletDef(uint32 index);
		static oBulletCache& sharedCache();
	protected:
		oBulletCache();
		oBulletDef* _currentDef;
		stack<oFace*> _faces;
		vector<oBulletDef*> _bulletDefs;
		CCSAXParser _parser;
	private:
		virtual void textHandler( void *ctx, const char *s, int len );
		virtual void startElement( void *ctx, const char *name, const char **atts );
		virtual void endElement( void *ctx, const char *name );
	};
}

#endif
